Detangle the restart/reboot/halt/save/restore code. There is now one point
authoremellor@ewan <emellor@ewan>
Tue, 27 Sep 2005 12:53:06 +0000 (13:53 +0100)
committeremellor@ewan <emellor@ewan>
Tue, 27 Sep 2005 12:53:06 +0000 (13:53 +0100)
commit4cafea04fa09012a1bb2f2941052ae606c751ced
tree851c97072d4cea04fd4d4ea43ccfce94657c9795
parent2585169bbbf4609a46957f1e5fd210ee8b942a8b
Detangle the restart/reboot/halt/save/restore code.  There is now one point
for management of shutdown state, XendDomainInfo.refreshShutdown, which is
able to cope whatever the current state of the domain.  This fixes bug #124:
running reboot within a domU doesn't bring the domain back up after shutdown,
and bug #256: "xm reboot" could not make domU reboot.

Fix the refreshing inside XendDomain to ensure that the values returned by xm
list reflect reality correctly.  We were removing XendDomainInfo instances,
but not creating them on start-up, so if xend were restarted, domain
information was being lost.

Merge XendDomain.dom0_unknown and initial_refresh into
XendDomainInfo.recreate.

Catch exceptions inside callInfo, and reraise them as XendErrors.

Remove unused XendDomain.close.

Further improvements are needed to XendDomainInfo to ensure that it avoids all
race conditions on shutdown, and can cope correctly with xend restarting
during a shutdown.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendDomainInfo.py